package com.aliang.shopping.model.po;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 地址表
 *
 * @TableName address
 */
@TableName(value = "address")
@Data
public class Address implements Serializable {
    /**
     * 数据Id
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 区域地址
     */
    @TableField(value = "area_address")
    private String areaAddress;

    /**
     * 详细地址
     */
    @TableField(value = "detail_address")
    private String detailAddress;

    /**
     * 联系人
     */
    @TableField(value = "contact")
    private String contact;

    /**
     * 电话号码
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 用户Id
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 首选状态（0非，1是）
     */
    @TableField(value = "first_status")
    private Integer firstStatus;

    /**
     * 排序索引，默认0
     */
    @TableField(value = "order_num")
    private Integer orderNum;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT,select = false)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE,select = false)
    private LocalDateTime updateTime;

    /**
     * 是否删除，0非，1是
     */
    @TableField(value = "is_delete",select = false)
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}